# Library
_LIB_TARGET_DIR = ../../cpputils
_LIB_SOURCES_DIR = $(_LIB_TARGET_DIR)/src
_LIB_INCLUDES_DIR = $(_LIB_TARGET_DIR)/include

# UnitTests
_UT_TARGET_DIR = ../../unittests
_UT_SOURCES_DIR = $(_UT_TARGET_DIR)/src
_UT_INCLUDES_DIR = $(_UT_TARGET_DIR)/include

# Test Dynmod
_TD_TARGET_DIR = ../../testdynmod
_TD_SOURCES_DIR = $(_TD_TARGET_DIR)/src
_TD_INCLUDES_DIR = $(_TD_TARGET_DIR)/include

lib_LTLIBRARIES = libcpputils.la libTestDynmod.la

libcpputils_la_SOURCES =$(_LIB_SOURCES_DIR)/CppUtils.cpp 				\
			$(_LIB_SOURCES_DIR)/RefObject.cpp 				\
			$(_LIB_SOURCES_DIR)/SystemException.cpp				\
		       	$(_LIB_SOURCES_DIR)/dynmod/ModuleImpl.cpp 			\
			$(_LIB_SOURCES_DIR)/dynmod/ModulesFactory.cpp 			\
			$(_LIB_SOURCES_DIR)/ept/ObjectPool.cpp 				\
			$(_LIB_SOURCES_DIR)/ept/ThreadPool.cpp 				\
			$(_LIB_SOURCES_DIR)/ept/Timer.cpp 				\
			$(_LIB_SOURCES_DIR)/exttypes/BigDecimal.cpp			\
			$(_LIB_SOURCES_DIR)/exttypes/BigInteger.cpp			\
			$(_LIB_SOURCES_DIR)/exttypes/RationalNumberTools.cpp			\			
			$(_LIB_SOURCES_DIR)/io/ByteArrayInputOutputStream.cpp		\
			$(_LIB_SOURCES_DIR)/io/StreamReframer.cpp			\
			$(_LIB_SOURCES_DIR)/utils/OSTools.cpp				\
			$(_LIB_SOURCES_DIR)/utils/SequenceGenerator.cpp			\
			$(_LIB_SOURCES_DIR)/utils/OSEndianTools.cpp			\
			$(_LIB_SOURCES_DIR)/utils/PostActionListenersContainer.cpp	\
			$(_LIB_SOURCES_DIR)/utils/Version.cpp

libcpputils_la_CXXFLAGS = -I$(_LIB_INCLUDES_DIR) 
libcpputils_la_LDFLAGS = -release $(VERSION) -lboost_thread$(BOOST_LIB_POSTFIX) -lboost_regex$(BOOST_LIB_POSTFIX) -lgmp $(OS_SPECIFIC_LDFLAGS)

nodist_libTestDynmod_la_SOURCES= $(_TD_SOURCES_DIR)/TestDM.cpp
libTestDynmod_la_CXXFLAGS= -I$(_TD_INCLUDES_DIR) -I$(_LIB_INCLUDES_DIR)
libTestDynmod_la_LDFLAGS= -release $(VERSION)

noinst_PROGRAMS = CppUtilsUnitTests 
nodist_CppUtilsUnitTests_SOURCES= $(_UT_SOURCES_DIR)/Main.cpp 	\
		$(_UT_SOURCES_DIR)/EPTTests.cpp 	\
		$(_UT_SOURCES_DIR)/IOTests.cpp 		\
		$(_UT_SOURCES_DIR)/DynmodTests.cpp 	\
		$(_UT_SOURCES_DIR)/ExtTypesTests.cpp 	\
		$(_UT_SOURCES_DIR)/UtilsTests.cpp 

CppUtilsUnitTests_LDADD = libcpputils.la
CppUtilsUnitTests_CXXFLAGS = -I$(_LIB_INCLUDES_DIR) -I$(_UT_INCLUDES_DIR) -I$(_TD_INCLUDES_DIR)
CppUtilsUnitTests_LDFLAGS = -lboost_unit_test_framework$(BOOST_LIB_POSTFIX) -lboost_test_exec_monitor -lgmp $(OS_SPECIFIC_LDFLAGS)
